Skip to main content

All Questions

0votes
0answers
333views

Best practice for Asynchronous CRUD operations in Android/Java

A few months back, I was working on designing a client API (FooManager) for adding/removing/fetching a list of objects (Bar). The requirements were simple- 1. Fetch operation is CPU-intensive and ...
VishalHemnani's user avatar
0votes
2answers
255views

Is this Singleton-like design pattern a feasible framework to build on?

I am posting this question here after it having been determined to be "off-topic" for stackoverflow, and "too hypothetical" for codereview. I am experimenting with different singleton-style design ...
user avatar
3votes
1answer
678views

Is Content Observer an implementation of Observer Pattern?

Observer Pattern is defined by the 'Gang of Four' Design Patterns book as a "one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated ...
Ricardo Faria's user avatar
2votes
4answers
3kviews

Put conditional logic inside method for DRY, or keep it outside for readability?

Take the following example which loads an interstitial ad every 10 times user does XYZ in the app, under certain conditions. It is called in multiple places in the code base: public class AdHandler { ...
Chris Cirefice's user avatar
1vote
1answer
2kviews

MVP: Should a View have multiple Presenters?

Is it desirable (from an architectural standpoint) to have more than one Presenter communicating with a View? In my particular situation I have one presenter communicating with multiple views, and ...
Another Droid Developer's user avatar
1vote
2answers
328views

Is this one method interface a good response to this interview question?

Today I received a rejection letter from a company where as part of the interview process they gave a a couple days to respond to the following question (paraphrased): Let’s say say you have ...
Ryan1729's user avatar
2votes
2answers
693views

Is 20 Java classes for just making a REST call too much?

In an Android project, I am using dagger 2 for dependency injection, applying mvp design pattern, and I am writing interface for almost every class. Although it does achieved the separation of ...
s-hunter's user avatar
2votes
1answer
755views

Is IntentService an implementation of Command Pattern?

According to Wikipedia: In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or ...
JP Ventura's user avatar
4votes
2answers
4kviews

Class becoming God Object what pattern to use

I am developing Android app and my MainActivity is becoming God Object. By the way native Activity class implementation is some sort of God Object already. The problem is that my activity class is ...
CROSP's user avatar
  • 1,558
7votes
2answers
5kviews

how can the presenter or view interact with the model in the MVP pattern?

I'm learning the MV* patterns. MVP in this case. I'm trying to refactor an old android application into the MVP pattern to make things less tightly coupled, but I'm struggling one one concept. I know ...
AlexW.H.B.'s user avatar
1vote
1answer
577views

Android Data persistence question

I have an android app in which users have sets of items, and each item has about 10 properties. What I do at the moment: items are stored in the server database when the user logs in, I get all the ...
J. K.'s user avatar
2votes
1answer
996views

Best practice for combining a Java Applet/ Android interface?

I'm working on an online game, which I am seriously considering writing a Java Applet for it. The game is not overly complex on the features. I'm considering at some point having at least 3 versions ...
PearsonArtPhoto's user avatar

close